package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OrderCancellationMapper;
import com.ruoyi.system.domain.OrderCancellation;
import com.ruoyi.system.service.IOrderCancellationService;

/**
 * 取消订单记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-25
 */
@Service
public class OrderCancellationServiceImpl implements IOrderCancellationService 
{
    @Autowired
    private OrderCancellationMapper orderCancellationMapper;

    /**
     * 查询取消订单记录
     * 
     * @param id 取消订单记录主键
     * @return 取消订单记录
     */
    @Override
    public OrderCancellation selectOrderCancellationById(Long id)
    {
        return orderCancellationMapper.selectOrderCancellationById(id);
    }

    /**
     * 查询取消订单记录列表
     * 
     * @param orderCancellation 取消订单记录
     * @return 取消订单记录
     */
    @Override
    public List<OrderCancellation> selectOrderCancellationList(OrderCancellation orderCancellation)
    {
        return orderCancellationMapper.selectOrderCancellationList(orderCancellation);
    }

    /**
     * 新增取消订单记录
     * 
     * @param orderCancellation 取消订单记录
     * @return 结果
     */
    @Override
    public int insertOrderCancellation(OrderCancellation orderCancellation)
    {
        return orderCancellationMapper.insertOrderCancellation(orderCancellation);
    }

    /**
     * 修改取消订单记录
     * 
     * @param orderCancellation 取消订单记录
     * @return 结果
     */
    @Override
    public int updateOrderCancellation(OrderCancellation orderCancellation)
    {
        return orderCancellationMapper.updateOrderCancellation(orderCancellation);
    }

    /**
     * 批量删除取消订单记录
     * 
     * @param ids 需要删除的取消订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderCancellationByIds(Long[] ids)
    {
        return orderCancellationMapper.deleteOrderCancellationByIds(ids);
    }

    /**
     * 删除取消订单记录信息
     * 
     * @param id 取消订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderCancellationById(Long id)
    {
        return orderCancellationMapper.deleteOrderCancellationById(id);
    }
}
